package com.ms.p2p.provider.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.ms.p2p.bean.PageBean;
import com.ms.p2p.entity.loan.Loan;
import com.ms.p2p.entity.loan.LoanDueIn;
import com.ms.p2p.entity.loan.LoanStay;
import com.ms.p2p.provider.LoanStayProvider;
import com.ms.p2p.service.impl.LoanStayServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Map;

/**
 * Created by daimajia on 2015/4/19 添加dubbo接口.
 */
@Service
public class LoanStayProviderImpl implements LoanStayProvider {
    @Autowired
    LoanStayServiceImpl loanStayService;

    public List<LoanDueIn> repay(String ip, Loan loan, LoanStay loanStay) {
        return loanStayService.repay(ip,loan,loanStay);
    }

    public LoanStay findNext(int loan_id) {
        return loanStayService.findNext(loan_id);
    }

    public int insert(LoanStay repay) {
        return loanStayService.insert(repay);
    }

    public int update(LoanStay repay) {
        return loanStayService.update(repay);
    }

    public List<Map<String, Object>> findPager(String userId, String userName, String borrowId, String status, String borrowName, String begin_date, String end_date, PageBean page) {
        return loanStayService.findPager(userId,userName,borrowId,status,borrowName,begin_date,end_date,page);
    }

    public int findCount(String userId, String userName, String borrowId, String status, String borrowName, String begin_date, String end_date) {
        return loanStayService.findCount(userId,userName,borrowId,status,borrowName,begin_date,end_date);
    }

    public List<LoanStay> findList(Integer id) {
        return loanStayService.findList(id);
    }
}
